package com.cskaoyan.bean.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
/**
 * @author 楚夏三分
 * @datetime 2023/1/4 16:31
 * @description: TODO: sms短信服务
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Captcha {
    String code;
    Date endTime;

    public boolean isValid() {
        // 当前还没到结束时间则验证码有效
        return !endTime.before(new Date());
    }
}
